﻿<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net" default-lazy-init="true">
  <description>Deletes a file first then creates it</description>

  <object id="MacroToProcess" type="Macro" name="MacroToProcess" >
    <constructor-arg name="templateId" value="1C420345-0A41-4f65-87C6-1B62E84DF560"/>
    <constructor-arg name="actionNames">
      <list element-type="string">
        <value>SympsonsMarriage</value>
        <value>DucksMarriage</value>
        <value>LisaHueyMarriage</value>
      </list>
    </constructor-arg>    
  </object>

  <!-- First the sympsons get married and have kids -->
  <object id="SympsonsMarriage" type="Collaboris.Saf.Tests.Support.Actions.MarrySympsons, Collaboris.Saf.Tests" >
    <property name ="Spouse">
      <object type="Collaboris.Saf.Tests.Support.Entities.Person">
        <property name="Forename" value="Marge"/>
        <property name="Surname" value="Sympson"/>
        <property name="Age" value="45"/>
      </object>
    </property>
      <property name ="Husband">
        <object type="Collaboris.Saf.Tests.Support.Entities.Person">
          <property name="Forename" value="Homer"/>
          <property name="Surname" value="Sympson"/>
          <property name="Age" value="50"/>
        </object>
      </property>
    <property name="Childs" value="#{SympsonKids}"/>     <!--Stores the value of the property on the SympsonKids placeholder-->
    <property name="Surname" value="#{SympsonSurname}"/> <!--Stores the value of the property on the SympsonSurname placeholder-->
  </object>

  <!-- Then donald and Daisy with the sympson as godparents and symsons kids as friends-->
  <object id="DucksMarriage" type="Collaboris.Saf.Tests.Support.Actions.MarryDucks, Collaboris.Saf.Tests" >
    <property name ="Husband">
      <object type="Collaboris.Saf.Tests.Support.Entities.Person">
        <property name="Forename" value="Donald"/>
        <property name="Surname" value="Duck"/>
        <property name="Age" value="20"/>
      </object>
    </property>
    <property name ="Spouse">
      <object type="Collaboris.Saf.Tests.Support.Entities.Person">
        <property name="Forename" value="Daisy"/>
        <property name="Surname" value="Duck"/>
        <property name="Age" value="23"/>
      </object>
    </property>
    <property name="Friends" value="@{SympsonKids}"/> <!--Gets the value from the SympsonKids placeholder-->

    <property name="Childs" value="#{DucksKids}"/>
    <!--<property name="Husband" value="#{DucksHusband}"/>-->
    <property name="Surname" value="#{DuckSurname}"/>
    <property name="GodParents" value="#{DucksGodparents}"/>
  </object>

  <!-- Finally, a few years later, Lisa and Huey get married with Donald Duck as special friend and the same godparents as the ducks marriage-->
  <object id="LisaHueyMarriage" type="Collaboris.Saf.Tests.Support.Actions.MarryHueyLisa, Collaboris.Saf.Tests" >
    <property name ="Spouse" expression="@(SympsonsMarriage).Childs[0]"/>
    <property name ="Husband" expression="@(DucksMarriage).Childs[0]"/>

    <property name="Friends" value="@{DucksKids}"/>
    <property name="GodParents" value="@{DucksGodparents}"/>
    <property name="Surname" value="@{DuckSurname}-@{SympsonSurname}"/>

  </object>

</objects>

